import Vue from 'vue'
import App from './App.vue'
import { initRouter } from './router'
import './theme/index.less'
import Antd from 'ant-design-vue'
import Viser from 'viser-vue'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import { initI18n } from '@/utils/i18n'
import bootstrap from '@/bootstrap'
import 'moment/locale/zh-cn'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueTreeList from 'vue-tree-list'
import {MessageBox} from 'element-ui'
import { Message } from "element-ui";
import Cookie from 'js-cookie'


import Print from 'vue-print-nb';
// 全局引用
Vue.use(Print);

const router = initRouter(store.state.setting.asyncRoutes)
const i18n = initI18n('CN', 'US')
Vue.use(ElementUI,{size: 'mini'})
Vue.use(Antd)
Vue.use(VueTreeList)
Vue.prototype.$confirm=MessageBox.confirm;
Vue.prototype.$message = Message;

Vue.config.silent = true
Vue.config.productionTip = false
Vue.prototype.$cookie =Cookie

Vue.config.errorHandler = false
Vue.config.warnHandler = false

Vue.use(Viser)
Vue.use(Plugins)



bootstrap({ router, store, i18n, message: Vue.prototype.$message })

new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount('#app')
